﻿<classes>
  <class name="Drop" assembly="UseCaseGenerator.BO" displayName="Drop">
    <property name="DropID" type="Guid" readWriteRule="WriteNew" compulsory="true" displayName="Drop ID" />
    <property name="StartDate" type="DateTime" compulsory="true" description="The date that work on the drop starts" />
    <property name="EndDate" type="DateTime" compulsory="true" description="The date that work on the drop finishes" />
    <property name="Name" compulsory="true" description="This is the name of the Drop typically will be Week1, Week2" />
    <property name="ReleaseID" type="Guid" compulsory="true" displayName="Release ID" />
    <primaryKey>
      <prop name="DropID" />
    </primaryKey>
    <relationship name="UseCases" type="multiple" relatedClass="UseCase" relatedAssembly="UseCaseGenerator.BO">
      <relatedProperty property="DropID" relatedProperty="DropID" />
    </relationship>
    <ui>
      <grid>
        <column heading="Name" property="Name" />
        <column heading="Start Date" property="StartDate">
          <parameter name="dateFormat" value="dd MMM yyyy" />
        </column>
        <column heading="End Date" property="EndDate">
          <parameter name="dateFormat" value="dd MMM yyyy" />
        </column>
      </grid>
      <form>
        <field label="Name:" property="Name" />
        <field label="Start Date: *" property="StartDate" type="DateTimePicker" />
        <field label="End Date: *" property="EndDate" type="DateTimePicker" />
      </form>
    </ui>
    <ui name="ExportDropInfo">
      <grid sortColumn="Name">
        <column heading="Name" property="Name" />
        <column heading="Start Date" property="StartDate">
          <parameter name="dateFormat" value="dd MMM yyyy" />
        </column>
        <column heading="End Date" property="EndDate">
          <parameter name="dateFormat" value="dd MMM yyyy" />
        </column>
        <column heading="Baseline Points" property="-BaselinePoints-" />
        <column heading="Assigned Points" property="-AssignedPoints-" />
      </grid>
    </ui>
  </class>
  <class name="Package" assembly="UseCaseGenerator.BO" displayName="Package">
    <property name="PackageID" type="Guid" readWriteRule="WriteNew" compulsory="true" displayName="Package ID" />
    <property name="PackageName" compulsory="true" />
    <property name="ProjectID" type="Guid" readWriteRule="WriteOnce" compulsory="true" displayName="Project ID">
      <businessObjectLookupList class="Project" assembly="UseCaseGenerator.BO" />
    </property>
    <property name="PackageNumber" compulsory="true" description="A unique number assigned to the Package (used for tracking)">
      <rule name="PackageNumber">
        <add key="maxLength" value="10" />
        <add key="minLength" value="1" />
      </rule>
    </property>
    <key>
      <prop name="PackageName" />
      <prop name="ProjectID" />
    </key>
    <primaryKey>
      <prop name="PackageID" />
    </primaryKey>
    <relationship name="Project" type="single" relatedClass="Project" reverseRelationship="Packages" relatedAssembly="UseCaseGenerator.BO">
      <relatedProperty property="ProjectID" relatedProperty="ProjectID" />
    </relationship>
    <relationship name="UseCases" type="multiple" relatedClass="UseCase" reverseRelationship="Package" relatedAssembly="UseCaseGenerator.BO" relationshipType="Aggregation">
      <relatedProperty property="PackageID" relatedProperty="PackageID" />
    </relationship>
    <ui>
      <grid>
        <column heading="Project" property="ProjectID" />
        <column heading="Package Number" property="PackageNumber" />
        <column heading="Package Name" property="PackageName" width="150" />
      </grid>
      <form>
        <field label="Project: *" property="ProjectID" type="ComboBox" />
        <field label="Package Number: *" property="PackageNumber" />
        <field label="Package Name: *" property="PackageName" />
      </form>
    </ui>
  </class>
  <class name="Project" assembly="UseCaseGenerator.BO" displayName="Project">
    <property name="ProjectID" type="Guid" readWriteRule="WriteNew" compulsory="true" />
    <property name="ProjectName" compulsory="true" description="The fuill name of the project to be used in documentation" />
    <property name="Customer" description="Project Customer" />
    <key name="UK1">
      <prop name="Customer" />
      <prop name="ProjectName" />
    </key>
    <primaryKey>
      <prop name="ProjectID" />
    </primaryKey>
    <relationship name="Packages" type="multiple" relatedClass="Package" reverseRelationship="Project" relatedAssembly="UseCaseGenerator.BO" relationshipType="Composition">
      <relatedProperty property="ProjectID" relatedProperty="ProjectID" />
    </relationship>
    <relationship name="Releases" type="multiple" relatedClass="Release" relatedAssembly="UseCaseGenerator.BO" relationshipType="Composition">
      <relatedProperty property="ProjectID" relatedProperty="ProjectID" />
    </relationship>
    <ui>
      <grid>
        <column heading="Project Name" property="ProjectName" />
        <column heading="Customer" property="Customer" />
      </grid>
      <form title="Project">
        <field label="Customer:" property="Customer" />
        <field label="Name: *" property="ProjectName" />
      </form>
    </ui>
  </class>
  <class name="Release" assembly="UseCaseGenerator.BO" displayName="Release">
    <property name="ReleaseID" type="Guid" readWriteRule="WriteNew" compulsory="true" displayName="Release ID">
      <businessObjectLookupList class="Project" assembly="UseCaseGenerator.BO" />
    </property>
    <property name="StartWorkDate" type="DateTime" description="The Date that work was started on the Release" />
    <property name="ProjectID" type="Guid" readWriteRule="WriteNew" compulsory="true" displayName="Project ID">
      <businessObjectLookupList class="Project" assembly="UseCaseGenerator.BO" />
    </property>
    <property name="EndWorkDate" type="DateTime" compulsory="true" displayName="End Date" description="The Date that work will be finished for the Release (I.e. the Release Date)" />
    <property name="ReleaseName" compulsory="true" />
    <primaryKey>
      <prop name="ReleaseID" />
    </primaryKey>
    <relationship name="Drops" type="multiple" relatedClass="Drop" relatedAssembly="UseCaseGenerator.BO" relationshipType="Aggregation" orderBy="EndDate ASC">
      <relatedProperty property="ReleaseID" relatedProperty="ReleaseID" />
    </relationship>
    <ui>
      <grid>
        <column heading="Project I D" property="ProjectID" />
        <column heading="Release Name" property="ReleaseName" />
        <column heading="Start Work Date" property="StartWorkDate" />
        <column heading="End Work Date" property="EndWorkDate" />
      </grid>
      <form>
        <field label="Project I D: *" property="ProjectID" type="ComboBox" />
        <field label="Release Name: *" property="ReleaseName" />
        <field label="Start Work Date:" property="StartWorkDate" type="DateTimePicker" />
        <field label="End Work Date: *" property="EndWorkDate" type="DateTimePicker" />
      </form>
    </ui>
  </class>
  <class name="UseCase" assembly="UseCaseGenerator.BO" displayName="Use Case">
    <property name="UserCaseID" type="Guid" readWriteRule="WriteNew" compulsory="true" />
    <property name="PackageID" type="Guid" compulsory="true" displayName="Package ID" />
    <property name="UseCaseNumber" type="Int32" autoIncrementing="true" />
    <property name="UseCaseName" compulsory="true" description="The name that the use case is given. This will be used as the name in the generated documentation" />
    <property name="Actors" />
    <property name="Description" description="A full description of the Use Case." />
    <property name="Assumptions" />
    <property name="PreConditions" />
    <property name="PostConditions" />
    <property name="Trigger" description="The Trigger (event) that causes this use case to start." />
    <property name="UserLastUpdated" type="DateTime" />
    <property name="DateTimeLastUpdated" type="DateTime" />
    <property name="DropID" type="Guid" displayName="Drop ID" />
    <property name="PointsAssigned" type="Int32" description="The number of points Assigned to this Use Case. The points assigned can range from 0 to 50. Where zero represents absolutely no effort (i.e. already done) and 50 represents the effort required for one developer or one peer programing team to Implement the use case in a Drop. If the use case is more complex than this then it should be split into sub use cases.">
      <rule name="PointsAssigned" message="The Points Assigned cannot be less than 0 or greater than 50. Since 50 represents the maximum effort of a peer programming team for 1 drop (whether that drop is one or 2 weeks). If your use case extends beyond a single drop then it should be split into multiple use cases.">
        <add key="max" value="50" />
      </rule>
    </property>
    <property name="BaselinePoints" type="Int32" readWriteRule="WriteOnce" description="The number of baseline points assigned to the use case" />
    <key name="UK1" ignoreIfNull="true">
      <prop name="Description" />
      <prop name="PackageID" />
    </key>
    <key name="UK2" ignoreIfNull="true">
      <prop name="PackageID" />
      <prop name="UseCaseNumber" />
    </key>
    <primaryKey>
      <prop name="UserCaseID" />
    </primaryKey>
    <relationship name="Package" type="single" relatedClass="Package" reverseRelationship="UseCases" relatedAssembly="UseCaseGenerator.BO">
      <relatedProperty property="PackageID" relatedProperty="PackageID" />
    </relationship>
    <relationship name="UseCaseSteps" type="multiple" relatedClass="UseCaseStep" reverseRelationship="UseCase" relatedAssembly="UseCaseGenerator.BO" relationshipType="Composition">
      <relatedProperty property="UserCaseID" relatedProperty="UseCaseID" />
    </relationship>
    <ui>
      <grid>
        <column heading="Use Case Name" property="UseCaseName" />
        <column heading="Description" property="Description" />
        <column heading="Assigned Points" property="PointsAssigned" />
        <column heading="Baseline Points" property="BaselinePoints" />
      </grid>
      <form title="Use Case">
        <field label="Use Case Number:" property="UseCaseNumber" />
        <field label="Use Case Name: *" property="UseCaseName" />
        <field label="PointsAssigned: *" property="PointsAssigned" />
        <field label="Actors:" property="Actors" />
        <field label="Description:" property="Description" />
        <field label="Assumptions:" property="Assumptions" />
        <field label="Pre Conditions:" property="PreConditions" />
        <field label="Post Conditions:" property="PostConditions" />
        <field label="Trigger:" property="Trigger" />
        <field label="User Last Updated:" property="UserLastUpdated" type="DateTimePicker" />
        <field label="Date Time Last Updated:" property="DateTimeLastUpdated" type="DateTimePicker" />
      </form>
    </ui>
    <ui name="DUI">
      <grid>
        <column heading="Trigger" property="Trigger" />
        <column heading="Use Case Number" property="UseCaseNumber" />
        <column heading="Use Case Name" property="UseCaseName" width="150" />
        <column heading="Description" property="Description" width="200" />
        <column heading="Assigned Points" property="PointsAssigned" />
		<column heading="Baseline Points" property="BaselinePoints" />
      </grid>
      <form>
        <field label="Use Case Number:" property="UseCaseNumber" />
        <field label="Use Case Name: *" property="UseCaseName" />
        <field label="Trigger:" property="Trigger" />
        <field label="Description:" property="Description" />
        <field label="Assigned Points:" property="PointsAssigned" />
        <field label="Baseline Points:" property="BaselinePoints" />
      </form>
    </ui>
  </class>
  <class name="UseCaseStep" assembly="UseCaseGenerator.BO" displayName="Use Case Step">
    <property name="UseCaseStepID" type="Guid" readWriteRule="WriteNew" compulsory="true" displayName="Use Case Step ID" />
    <property name="UseCaseID" type="Guid" readWriteRule="WriteOnce" compulsory="true" displayName="Use Case ID" />
    <property name="StepNumber" type="Int32" compulsory="true" description="The sequential number for the step e.g. 1. or 1.1 or 1.1.1 depending on the level of indent" />
    <property name="StepDescription" compulsory="true" description="A Full description of the Step" />
    <property name="UserLastUpdated" compulsory="true" />
    <property name="DateTimeLastUpdated" type="DateTime" compulsory="true" />
    <key name="UK1">
      <prop name="StepNumber" />
      <prop name="UseCaseID" />
    </key>
    <primaryKey>
      <prop name="UseCaseStepID" />
    </primaryKey>
    <relationship name="UseCase" type="single" relatedClass="UseCase" reverseRelationship="UseCaseSteps" relatedAssembly="UseCaseGenerator.BO">
      <relatedProperty property="UseCaseID" relatedProperty="UserCaseID" />
    </relationship>
    <ui>
      <grid sortColumn="StepNumber">
        <column heading="Step Number" property="StepNumber" />
        <column heading="Step Description" property="StepDescription" />
        <column heading="User Last Updated" property="UserLastUpdated" />
        <column heading="Date Time Last Updated" property="DateTimeLastUpdated" />
      </grid>
      <form title="Use Case Item">
        <field label="Item: *" property="StepDescription" />
        <field label="Item Number: *" property="StepNumber" />
      </form>
    </ui>
  </class>
</classes>